Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation and Parsing of 802.15.4 Beacon and Command frames. #1904

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

darbyShaw
Copy link

The following code changes cater to the creation and parsing
of 802.15.4 beacon and command frames.

heenasirwani added 2 commits October 25, 2016 19:28
The following code changes cater to the creation and parsing
of 802.15.4 beacon and command frames.
@kkrentz
Copy link
Contributor

kkrentz commented Oct 27, 2016

Apparently, these changes conflict with mine. In #880, I adapted the framer_802154 to also parse and create beacon frames. In #1703, I added support for processing command frames.

@ENIGH
Copy link

ENIGH commented Nov 2, 2016

Hello
I search to make a small example by beacon just transmission and reception how can i do that please?

@hxyzha
Copy link

hxyzha commented Nov 3, 2016

Hi,
Please in #250 ( powerSource) did it give as the power level in the node please ?

@kkrentz
Copy link
Contributor

kkrentz commented Nov 9, 2016

@ENIGH for creating beacon frames you can do something like this:

packetbuf_clear();
packetbuf_set_attr(PACKETBUF_ATTR_FRAME_TYPE, FRAME802154_BEACONFRAME);
/* set further packetbuf attributes */
/* write payload */
paketbuf_set_datalen(x);
NETSTACK_LLSEC.send(NULL, NULL);

For processing beacon frames, you can insert some code into nullsec.c:

if(packetbuf_attr(PACKETBUF_ATTR_FRAME_TYPE) == FRAME802154_BEACONFRAME) {
  /* process beacon frame */
}

Processing command frames is more convenient thanks to my cmd-broker.c. In akes.c, you can see how I send and receive command frames.

@ENIGH
Copy link

ENIGH commented Nov 14, 2016

@kkrentz
Thanks sir but how can i exploit it with an examples ?
I would make an example in which PAN send beacon frame in which it gives SO and BO value to other node of network that is what i search

@kkrentz
Copy link
Contributor

kkrentz commented Nov 14, 2016

Sorry, but I do not understand what you want exactly.

@ENIGH
Copy link

ENIGH commented Nov 14, 2016

@kkrentz
At first step i want that PANcoor send BO and SO value in the beacon frame to other node
https://github.com/contiki-os/contiki/pull/1904/files#diff-a5c6067d8fa8e56903d7e037399ce294R657
https://github.com/contiki-os/contiki/pull/1904/files#diff-a5c6067d8fa8e56903d7e037399ce294R658

10a2bce#diff-1d8138bcf9107b0b4f3ebc91a5402fc2R201
10a2bce#diff-1d8138bcf9107b0b4f3ebc91a5402fc2R202

At the secont step other node wil receive this BO and SO and i will see its effects at the powertrace

@simonduq
Copy link
Member

Hello,
Please make sure the code complies with https://github.com/contiki-os/contiki/blob/master/doc/code-style.c

alexrayne pushed a commit to alexrayne/contiki that referenced this pull request Jul 9, 2022
Fix sign comparison warnings in uiplib.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants